<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the error message corresponding to a result code (MQRC)</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.mqseries-set.html">« mqseries_set</a></li>
      <li style="float: right;"><a href="book.network.html">网络 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.mqseries.html">mqseries 函数</a></li>
    <li>Returns the error message corresponding to a result code (MQRC)</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.mqseries-strerror" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mqseries_strerror</h1>
  <p class="verinfo">(PECL mqseries &gt;= 0.10.0)</p><p class="refpurpose"><span class="refname">mqseries_strerror</span> &mdash; <span class="dc-title">Returns the error message corresponding to a result code (MQRC)</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.mqseries-strerror-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mqseries_strerror</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$reason</code></span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>mqseries_strerror()</strong></span>
   returns the message that correspond to the reason result code.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mqseries-strerror-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>

      <code class="parameter">reason</code>
     </dt>

     <dd>

      <p class="para">Reason code qualifying the compCode.</p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mqseries-strerror-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">string representation of the reason code message.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mqseries-strerror-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4423">
    <p><strong>示例 #1 
     <span class="function"><strong>mqseries_strerror()</strong></span>
     example
    </strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">$comp_code&nbsp;</span><span style="color: #007700">!==&nbsp;</span><span style="color: #0000BB">MQSERIES_MQCC_OK</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"open&nbsp;CompCode:%d&nbsp;Reason:%d&nbsp;Text:%s&lt;br&gt;\n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$comp_code</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$reason</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">mqseries_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">$reason</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Connx CompCode:2 Reason:2059 Text:Queue manager not available for connection.                    
</pre></div>
    </div>
   </div>
  </p>
 </div>

</div></div></div></body></html>